<template>
  <div>

    {{ count }}
    <!-- <input type="text" v-model="name">
    <button @click="push">获取数据</button>
    {{ detail }} -->
    
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue'
import emitter from '@/utils/emitter';
import axios from 'axios';
import { useCounterStore } from '@/stores/counter.js'
import { storeToRefs } from 'pinia';
const store = useCounterStore()
const { count } = storeToRefs(store)    //得到仓库里的数据内容

// const name = ref('')
//  emitter.on('receive',(value)=>{
//    console.log(value)
//     name.value=value
// })
// const detail=ref(null)


    
  // console.log(name.value)
  axios.get('http://localhost:3000',{
     params:{
         Name:count.value
     }
  }).then(res => {
       count.value=res.data
    })

</script>

<style scoped>
</style>